#ifndef MUTATRANSPORT_H
#define MUTATRANSPORT_H

#include <QPushButton>
#include <QObject>
#include <QSpinBox>
#include <QDoubleSpinBox>
#include <QEvent>
#include <QDebug>
#include <QMainWindow>

class MutaSpinBox : public QSpinBox
{
    Q_OBJECT

public:
    MutaSpinBox(QWidget* parent)
        : QSpinBox(parent)
    {
    }

protected:
    void wheelEvent(QWheelEvent *event) {

    }
};

class MutaDoubleSpinBox : public QDoubleSpinBox
{
    Q_OBJECT

public:
    MutaDoubleSpinBox(QWidget* parent)
        : QDoubleSpinBox(parent)
    {
    }
protected:
    void wheelEvent(QWheelEvent *event) {

    }
};

class MutaTransport : public QObject
{
    Q_OBJECT
public:
    MutaTransport(QMainWindow* parent, int x,int y);
    QPushButton* getRewind();
    QPushButton* getStop();
    QPushButton* getPlay();
    QPushButton* getFastForward();
    QPushButton* getBack();
    QPushButton* getForward();
    QPushButton* getLineButton();
    QPushButton* getEventButton();

    QPushButton* getCurveButton();
    QPushButton* getTendrilButton();
    QPushButton* getBlendButton();
    QPushButton* getStrangeAttractorButton();


    QPushButton* getRepeatButton();
    QPushButton* getSave();
    QPushButton* getLoad();
    QPushButton* getOSCthulhuButton();

    QDoubleSpinBox* getTempoDisplay();
    QSpinBox* getBeatsDisplay();
    QSpinBox* getLengthDisplay();
    QSpinBox* getSendPort();

private:
    int x;
    int y;
    float buttonSizeX;
    float buttonSizeY;
    QPushButton play;
    QPushButton stop;
    QPushButton rewind;
    QPushButton fastForward;
    QPushButton back;
    QPushButton forward;
    QPushButton lineButton;
    QPushButton eventButton;
    QPushButton repeatButton;
    QPushButton save;
    QPushButton load;
    int beat;
    MutaSpinBox beatsDisplay;
    MutaSpinBox lengthDisplay;
    MutaDoubleSpinBox tempoDisplay;
    QMainWindow* w;

    QPushButton curveButton;
    QPushButton autoTendrilButton;
    QPushButton blendButton;
    QPushButton strangeAttractorButton;
    QPushButton oscthulhuButton;
    QSpinBox sendPort;

public slots:
    void playing();
    void stopping();
    void rewinding();
    void fastForwarding();

    void lineEditing();
    void eventEditing();
    void repeatEditing();
    void curveEditing();
    void tendrilEditing();
    void blendEditing();
    void strangeAttractorEditing();

    void windowResized();
};

#endif // MUTATRANSPORT_H
